﻿using System;

namespace CustomaAttributes
{
    [AttributeUsage(AttributeTargets.Class | AttributeTargets.Method | AttributeTargets.Constructor, AllowMultiple = true, Inherited = false)]
    public class LastCustomaAttributes : Attribute
    {
        private readonly DateTime _dateModified;
        private readonly string _changes;
        private readonly string _explain;
        public LastCustomaAttributes(string dateModified, string changes, string explain)
        {
            _dateModified = DateTime.Parse(dateModified);
            _changes = changes;
            _explain = explain;
        }

        public DateTime DateModified => _dateModified;

        public string Changes => _changes;

        public string Explain => _explain;
        // 存在一个公共属性，用于描述关于该数据项的任何重要问题
        public string Issues { get; set; }  
    }
    /// <summary>
    /// 不带任何参数的特性
    /// 用于把程序集标记为通过LastModifiedAttribute维护的文档
    /// </summary>
    [AttributeUsage(AttributeTargets.Assembly)]
    public class SupportsWhatsNewAttribute : Attribute
    {
    }
}
